home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9432 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 69 73 | 6f 6e 65 77 73 2e 62 62 |Path: is|onews.bb|
|00000010| 6e 2e 68 70 2e 63 6f 6d | 21 68 70 62 62 6c 62 21 |n.hp.com|!hpbblb!|
|00000020| 6e 65 77 73 0a 46 72 6f | 6d 3a 20 4d 61 74 74 68 |news.Fro|m: Matth|
|00000030| 69 61 73 20 44 69 74 74 | 72 69 63 68 20 3c 6d 61 |ias Ditt|rich <ma|
|00000040| 74 74 69 3e 0a 4e 65 77 | 73 67 72 6f 75 70 73 3a |tti>.New|sgroups:|
|00000050| 20 63 6f 6d 70 2e 6c 61 | 6e 67 2e 63 2b 2b 0a 53 | comp.la|ng.c++.S|
|00000060| 75 62 6a 65 63 74 3a 20 | 52 65 3a 20 48 6f 77 20 |ubject: |Re: How |
|00000070| 74 6f 20 63 6f 70 79 20 | 61 6e 20 6f 62 6a 65 63 |to copy |an objec|
|00000080| 74 3f 0a 44 61 74 65 3a | 20 32 38 20 46 65 62 20 |t?.Date:| 28 Feb |
|00000090| 31 39 39 36 20 31 37 3a | 35 36 3a 33 35 20 47 4d |1996 17:|56:35 GM|
|000000a0| 54 0a 4f 72 67 61 6e 69 | 7a 61 74 69 6f 6e 3a 20 |T.Organi|zation: |
|000000b0| 48 65 77 6c 65 74 74 2d | 50 61 63 6b 61 72 64 20 |Hewlett-|Packard |
|000000c0| 43 6f 2e 0a 4d 65 73 73 | 61 67 65 2d 49 44 3a 20 |Co..Mess|age-ID: |
|000000d0| 3c 34 68 32 35 30 6a 24 | 74 30 68 40 68 70 62 62 |<4h250j$|t0h@hpbb|
|000000e0| 6c 62 2e 62 62 6e 2e 68 | 70 2e 63 6f 6d 3e 0a 52 |lb.bbn.h|p.com>.R|
|000000f0| 65 66 65 72 65 6e 63 65 | 73 3a 20 3c 34 68 30 35 |eference|s: <4h05|
|00000100| 72 62 24 73 75 36 40 61 | 74 6c 61 73 2e 74 6e 63 |rb$su6@a|tlas.tnc|
|00000110| 6e 65 74 2e 63 6f 6d 3e | 0a 4e 4e 54 50 2d 50 6f |net.com>|.NNTP-Po|
|00000120| 73 74 69 6e 67 2d 48 6f | 73 74 3a 20 74 72 61 62 |sting-Ho|st: trab|
|00000130| 61 6e 74 2e 62 62 6e 2e | 68 70 2e 63 6f 6d 0a 4d |ant.bbn.|hp.com.M|
|00000140| 69 6d 65 2d 56 65 72 73 | 69 6f 6e 3a 20 31 2e 30 |ime-Vers|ion: 1.0|
|00000150| 0a 43 6f 6e 74 65 6e 74 | 2d 54 79 70 65 3a 20 74 |.Content|-Type: t|
|00000160| 65 78 74 2f 70 6c 61 69 | 6e 3b 20 63 68 61 72 73 |ext/plai|n; chars|
|00000170| 65 74 3d 75 73 2d 61 73 | 63 69 69 0a 43 6f 6e 74 |et=us-as|cii.Cont|
|00000180| 65 6e 74 2d 54 72 61 6e | 73 66 65 72 2d 45 6e 63 |ent-Tran|sfer-Enc|
|00000190| 6f 64 69 6e 67 3a 20 37 | 62 69 74 0a 58 2d 4d 61 |oding: 7|bit.X-Ma|
|000001a0| 69 6c 65 72 3a 20 4d 6f | 7a 69 6c 6c 61 20 31 2e |iler: Mo|zilla 1.|
|000001b0| 31 4e 20 28 58 31 31 3b | 20 49 3b 20 48 50 2d 55 |1N (X11;| I; HP-U|
|000001c0| 58 20 41 2e 30 39 2e 30 | 37 20 39 30 30 30 2f 37 |X A.09.0|7 9000/7|
|000001d0| 31 32 29 0a 54 6f 3a 20 | 73 69 6d 6f 6e 6c 40 64 |12).To: |simonl@d|
|000001e0| 61 74 61 77 6f 72 6b 73 | 2e 63 6f 6d 0a 58 2d 55 |ataworks|.com.X-U|
|000001f0| 52 4c 3a 20 6e 65 77 73 | 3a 34 68 30 35 72 62 24 |RL: news|:4h05rb$|
|00000200| 73 75 36 40 61 74 6c 61 | 73 2e 74 6e 63 6e 65 74 |su6@atla|s.tncnet|
|00000210| 2e 63 6f 6d 0a 0a 53 69 | 6d 6f 6e 20 4c 65 65 20 |.com..Si|mon Lee |
|00000220| 28 53 69 6d 6f 6e 20 4c | 65 65 29 20 77 72 6f 74 |(Simon L|ee) wrot|
|00000230| 65 3a 0a 3e 0a 3e 48 65 | 6c 6c 6f 2c 0a 3e 0a 3e |e:.>.>He|llo,.>.>|
|00000240| 49 27 6d 20 74 72 79 69 | 6e 67 20 74 6f 20 68 61 |I'm tryi|ng to ha|
|00000250| 76 65 20 61 20 6d 65 6d | 62 65 72 20 66 75 6e 63 |ve a mem|ber func|
|00000260| 74 69 6f 6e 20 72 65 74 | 75 72 6e 20 61 20 64 75 |tion ret|urn a du|
|00000270| 70 6c 69 63 61 74 65 20 | 63 6f 70 79 20 6f 66 20 |plicate |copy of |
|00000280| 61 0a 3e 6d 65 6d 62 65 | 72 20 64 61 74 61 20 6f |a.>membe|r data o|
|00000290| 62 6a 65 63 74 2e 20 20 | 48 6f 77 20 77 6f 75 6c |bject. |How woul|
|000002a0| 64 20 49 20 67 6f 20 61 | 62 6f 75 74 20 74 68 69 |d I go a|bout thi|
|000002b0| 73 3f 0a 3e 0a 3e 49 65 | 2e 0a 3e 0a 3e 63 6c 61 |s?.>.>Ie|..>.>cla|
|000002c0| 73 73 20 78 20 7b 0a 3e | 70 72 69 76 61 74 65 3a |ss x {.>|private:|
|000002d0| 0a 3e 09 59 20 20 2a 6f | 62 6a 65 63 74 5f 6f 66 |.>.Y *o|bject_of|
|000002e0| 5f 63 6c 61 73 73 5f 79 | 3b 0a 3e 0a 3e 70 75 62 |_class_y|;.>.>pub|
|000002f0| 6c 69 63 3a 0a 3e 09 59 | 20 47 65 74 59 28 29 3b |lic:.>.Y| GetY();|
|00000300| 0a 49 20 77 6f 75 6c 64 | 20 70 72 65 66 65 72 20 |.I would| prefer |
|00000310| 72 65 74 75 72 6e 69 6e | 67 20 61 20 70 6f 69 6e |returnin|g a poin|
|00000320| 74 65 72 20 68 65 72 65 | 3a 0a 09 59 2a 20 47 65 |ter here|:..Y* Ge|
|00000330| 74 59 28 29 3b 0a 3e 7d | 3b 0a 3e 0a 3e 0a 3e 49 |tY();.>}|;.>.>.>I|
|00000340| 20 77 6f 75 6c 64 20 6c | 69 6b 65 20 47 65 74 59 | would l|ike GetY|
|00000350| 28 29 20 74 6f 20 72 65 | 74 75 72 6e 20 61 20 63 |() to re|turn a c|
|00000360| 6f 70 79 20 6f 66 20 6f | 62 6a 65 63 74 5f 6f 66 |opy of o|bject_of|
|00000370| 5f 63 6c 61 73 73 5f 79 | 2c 20 6e 6f 74 20 61 20 |_class_y|, not a |
|00000380| 70 6f 69 6e 74 65 72 0a | 3e 74 6f 20 69 74 2e 0a |pointer.|>to it..|
|00000390| 3e 0a 3e 20 2e 2e 2e 2e | 0a 41 73 73 75 6d 69 6e |>.> ....|.Assumin|
|000003a0| 67 20 79 6f 75 20 68 61 | 76 65 20 61 6e 20 61 70 |g you ha|ve an ap|
|000003b0| 70 72 6f 70 72 69 61 74 | 65 20 63 6f 70 79 20 63 |propriat|e copy c|
|000003c0| 6f 6e 73 74 72 75 63 74 | 6f 72 2c 20 74 68 65 6e |onstruct|or, then|
|000003d0| 20 79 6f 75 20 63 61 6e | 20 77 72 69 74 65 0a 0a | you can| write..|
|000003e0| 59 2a 20 78 3a 3a 47 65 | 74 59 28 29 0a 7b 0a 20 |Y* x::Ge|tY().{. |
|000003f0| 20 72 65 74 75 72 6e 20 | 6e 65 77 20 59 28 2a 6f | return |new Y(*o|
|00000400| 62 6a 65 63 74 5f 6f 66 | 5f 63 6c 61 73 73 5f 79 |bject_of|_class_y|
|00000410| 29 3b 0a 7d 0a 0a 47 6f | 6f 64 20 6c 75 63 6b 2c |);.}..Go|od luck,|
|00000420| 0a 4d 61 74 74 68 69 61 | 73 0a 0a |.Matthia|s.. |
+--------+-------------------------+-------------------------+--------+--------+